package abstracted;

public class TryPolymorphism {
	public static void main(String[] args) {
		Ball[] sack = new Ball[3];
		
		sack[0] = new RedBall();
		sack[1] = new GreenBall();
		sack[2] = new BlackBall();
		
		int random = (int)(Math.random()*sack.length);
		Ball selected = sack[random];
		selected.getColor();
		selected.getSize();
	}
}
